﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlphaD.Core
{
    public class LinearDiffEq2Bvp
    {
        public LinearDiffEq2Bvp(LinearDiffEq2 equestion, BoundaryCondition leftCondition, BoundaryCondition rightCondition)
        {
            if (leftCondition.X >= rightCondition.X)
            {
                throw new ArgumentException("The condition must take place: a < b");
            }

            if (leftCondition.Type == BoundaryConditionType.Second && leftCondition.K != equestion.K)
            {
                throw new ArgumentException("'k' in the left condition must be equal to k in the equestion");
            }

            if (rightCondition.Type == BoundaryConditionType.Second && rightCondition.K != equestion.K)
            {
                throw new ArgumentException("'k' in the right condition must be equal to k in the equestion");
            }

            this.Equestion = equestion;
            this.LeftCondition = leftCondition;
            this.RightCondition = rightCondition;
        }

        public LinearDiffEq2 Equestion { get; private set; }
        public BoundaryCondition LeftCondition { get; private set; }
        public BoundaryCondition RightCondition { get; private set; }
    }
}
